load("@io_bazel_stardoc//stardoc:stardoc.bzl", "stardoc")

stardoc(
    name = "buildozer_rule_docs",
    out = "buildozer_rule.in.md",
    input = "//buildozer:def.bzl",
    symbol_names = [
        "_buildozer",
    ],
    deps = [
        "@bazel_skylib//lib:shell",
    ],
)

genrule(
    name = "docs",
    srcs = [
        ":buildozer_rule_docs",
    ],
    outs = [
        "buildozer_rule.md",
    ],
    cmd = "sed -e 's/_buildozer/buildozer/g' $(location :buildozer_rule_docs) > $@",
)
